package logic

import (
	"context"
	"hem/models/mysql"

	"hem/hemrpc/hemrpc"
	"hem/hemrpc/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type HemDelLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewHemDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *HemDelLogic {
	return &HemDelLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *HemDelLogic) HemDel(in *hemrpc.HemDelRequest) (*hemrpc.HemDelResponse, error) {
	// todo: add your logic here and delete this line
	var hem mysql.Hem
	mysql.DB.Debug().Delete(&hem)

	return &hemrpc.HemDelResponse{}, nil
}
